﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ERP.Manager.DataProvider;
using ERP.Manager.DataEntity;
namespace ERP.Manager.BusinessServices
{
    public class ECS_attributeinfoServices
    {
        private readonly IECS_attributeinfoRepository ecs_attributeinforepository;
        public ECS_attributeinfoServices() { }
        public ECS_attributeinfoServices(IECS_attributeinfoRepository ecs_attributeinforepository)
        {
            this.ecs_attributeinforepository = ecs_attributeinforepository;
        }
         /// <summary>
        /// 根据商品类型编号查询商品类型的属性的方法
        /// </summary>
        /// <param name="attr_id"></param>
        /// <param name="pagecount"></param>
        /// <returns></returns>
        public List<ECS_attributeinfo> all_ecs_attributeinfo_page(int cat_id, int pagecount)
        {
            return ecs_attributeinforepository.all_ecs_attributeinfo_page(cat_id,pagecount);
        }
         /// <summary>
        /// 根据商品类型编号查询商品类型的属性的方法
        /// </summary>
        /// <param name="new_cat_id"></param>
        /// <returns></returns>
        public List<ECS_attributeinfo> all_ecs_attributeinfo(int new_cat_id)
        {
            return ecs_attributeinforepository.all_ecs_attributeinfo(new_cat_id);
        }
         /// <summary>
        /// 添加商品类型属性的方法
        /// </summary>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public int add_ecs_attrbuteinfo(ECS_attributeinfo attribute)
        {
            return ecs_attributeinforepository.add_ecs_attrbuteinfo(attribute);
        }
         /// <summary>
        /// 查询商品类型属性的详细信息
        /// </summary>
        /// <param name="attr_id"></param>
        /// <returns></returns>
        public ECS_attributeinfo detail_ecs_attributeinfo(int attr_id)
        {
            return ecs_attributeinforepository.detail_ecs_attributeinfo(attr_id);
        }
          /// <summary>
        /// 修改商品类型属性的方法
        /// </summary>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public int update_ecs_attributeinfo(ECS_attributeinfo attribute)
        {
            return ecs_attributeinforepository.update_ecs_attributeinfo(attribute);
        }
         /// <summary>
        /// 删除商品类型属性的方法
        /// </summary>
        /// <param name="attr_id"></param>
        /// <returns></returns>
        public int delete_ecs_attributeinfo(int attr_id)
        {
            return ecs_attributeinforepository.delete_ecs_attributeinfo(attr_id);
        }
        /// <summary>
        /// 根据商品类型编号查询该商品类型的属性的方法
        /// </summary>
        /// <param name="cat_id"></param>
        /// <returns></returns>
        public int all_ecs_attributeinfo_cat_id_count(int cat_id)
        {
            return ecs_attributeinforepository.all_ecs_attributeinfo_cat_id_count(cat_id);
        }
    }
}
